import service from "@/utils/request";
import type { Response, PageResponse } from "@/types/common";
import type { MonitorDeviceItem } from "@/types/monitor/device";

// return service<any, Response<PageResponse<MonitorDeviceItem>>>({
//  return service<any, Response<MonitorDeviceItem>>({
export const useMonitorDevicePageApi = (params: object) => {
  return service<any, Response<PageResponse<MonitorDeviceItem>>>({
    url: `/v1/monitor/device/page`,
    method: "GET",
    params,
  });
};

export const useMonitorDeviceQueryApi = (params: object) => {
  return service<any, Response<MonitorDeviceItem>>({
    url: `/v1/monitor/device/query`,
    method: "GET",
    params,
  });
};

export const useMonitorDeviceCreateApi = (data: object) => {
  return service({
    url: `/v1/monitor/device/create`,
    method: "POST",
    data,
  });
};

export const useMonitorDeviceUpdateApi = (data: object) => {
  return service({
    url: `/v1/monitor/device/update`,
    method: "POST",
    data,
  });
};

export const useMonitorDeviceDeleteApi = (data: object) => {
  return service({
    url: `/v1/monitor/device/delete`,
    method: "DELETE",
    data,
  });
};
